home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Development Tools & Languages / AEGestalt 1.0 / UInformationView.cp < prev    next >
Encoding:
Text File  |  1992-07-15  |  2.3 KB  |  93 lines  |  [TEXT/MPS ]

  1. //     UInformationView.cp 
  2. //     Copyright © 1991-92 by Apple Computer, Inc. All rights reserved.
  3. //    Kent Sandvik DTS
  4. //    This file contains all the TInformationView member functions, used
  5. //    for drawing information in the TInformationView view.
  6. //
  7. //    <1>        khs        1.0        First final version
  8.  
  9.  
  10. #ifndef __INFORMATIONVIEW__
  11. #include "UInformationView.h"
  12. #endif
  13.  
  14.  
  15. //    Empty constructor - for avoiding ptabs in global data space
  16. #pragma segment ARes
  17. TInformationView::TInformationView()
  18. {
  19. }
  20.  
  21.  
  22. #pragma segment ARes
  23. pascal void TInformationView::Initialize()
  24. {
  25.     inherited::Initialize();
  26.     fHasGestaltInfo = FALSE;
  27.  
  28.     fLabel1 = ".........";
  29.     fLabel2 = ".........";
  30.     fLabel3 = ".........";
  31.     fLabel4 = ".........";
  32.     fLabel5 = ".........";
  33.     fLabel6 = ".........";
  34.     fLabel7 = ".........";
  35.     fLabel8 = ".........";
  36.     fLabel9 = ".........";
  37.     fLabel10 = ".........";
  38.     fLabel11 = ".........";
  39.     fLabel12 = ".........";
  40. }
  41.  
  42.  
  43. //    draw the contents of the drawing object to screen
  44. #pragma segment ARes
  45. pascal void TInformationView::Draw(const VRect& area)
  46. {
  47.     inherited::Draw(area);
  48.     // draw the real thing!
  49.     this->DrawInformation();
  50. }
  51.  
  52.  
  53. #pragma segment ARes
  54. pascal void TInformationView::DrawInformation()
  55. {
  56.     // Set font and font size
  57.     PenNormal();
  58.     TextFont(geneva);
  59.     TextSize(9);
  60.     TextFace(bold);
  61.  
  62.     // Draw Labels
  63.     MoveTo(kHorizontStart, kVerticalStart);
  64.     DrawString(fLabel1);
  65.     MoveTo(kHorizontStart, kVerticalStart + kVerticalOffset);
  66.     DrawString(fLabel2);
  67.     MoveTo(kHorizontStart, kVerticalStart + 2 * kVerticalOffset);
  68.     DrawString(fLabel3);
  69.     MoveTo(kHorizontStart, kVerticalStart + 3 * kVerticalOffset);
  70.     DrawString(fLabel4);
  71.     MoveTo(kHorizontStart, kVerticalStart + 4 * kVerticalOffset);
  72.     DrawString(fLabel5);
  73.     MoveTo(kHorizontStart, kVerticalStart + 5 * kVerticalOffset);
  74.     DrawString(fLabel6);
  75.     MoveTo(kHorizontStart, kVerticalStart + 6 * kVerticalOffset);
  76.     DrawString(fLabel7);
  77.     MoveTo(kHorizontStart, kVerticalStart + 7 * kVerticalOffset);
  78.     DrawString(fLabel8);
  79.     MoveTo(kHorizontStart, kVerticalStart + 8 * kVerticalOffset);
  80.     DrawString(fLabel9);
  81.     MoveTo(kHorizontStart, kVerticalStart + 9 * kVerticalOffset);
  82.     DrawString(fLabel10);
  83.     MoveTo(kHorizontStart, kVerticalStart + 10 * kVerticalOffset);
  84.     DrawString(fLabel11);
  85.     MoveTo(kHorizontStart, kVerticalStart + 11 * kVerticalOffset);
  86.     DrawString(fLabel12);
  87.  
  88.     // restore pen
  89.     PenNormal();
  90. }
  91.  
  92.  
  93.